package com.linglan.common.enums;

import lombok.Getter;

@Getter
public enum HotSearchType {
    /**
     * 医生
     */
    DOC(1),
    ;

    private final Integer code;

    HotSearchType(Integer code) {
        this.code = code;
    }

    public static HotSearchType getByCode(Integer code) {
        if (code == null) {
            return null;
        }
        for (HotSearchType value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

}
